package com.hmall.common;

import com.hmall.common.pojo.Item;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient("itemservice")
public interface FeignClientItem {

    @GetMapping("/item/{id}")
    Item getItem(@PathVariable("id") Integer id);

    @PutMapping("item/stock/{itemId}/{num}")
    void Stock(@PathVariable("itemId") long itemId, @PathVariable("num") Integer num);
}
